package com.zhouyu.exampledesignmoudle.decorator;

/**
 * @Description:装饰1
 */
public class ChangeFish extends Changer {
    ChangeFish(TheGreatestSage theGreatestSage) {
        super(theGreatestSage);
    }

    private void dodecors() {
        Monkey monkey = (Monkey) theGreatestSage;
        monkey.setSkin("齐天大圣装饰成为一只鱼");
    }

    @Override
    public void display() {
        dodecors();
        //委派给具体构件
        theGreatestSage.display();
    }
}
